<?php
	$protectid="306"; 
	include("../protect.php");
	
	include_once("../../config.inc.php");
	
	
	include(CFG_LIB_DIR."buy_car_cs.php");
	$objBuyCar = new Buy_CS();
	$ID = $_GET['ID'];
	if(empty($ID)){ 
		$ID = 1; 
		$name = "支付宝";	
	} else {
		$name = "网银在线";
	}

	if($_POST["action"]=="edit")
	{
		$parameter=array(
						 "ID"=>$ID,
						 "PartnerID"=>$PartnerID,
						 "SecurityCode"=>$SecurityCode,
						 "SellerEmail"=>$SellerEmail
						 );
		$blnReSult=$objBuyCar->EditPayPartnerInfo($parameter);
		if($blnReSult)
		{
			exit("<script type=\"text/javascript\">alert('提交成功');location.href=\"pay_partner_info.php\";</script>");
		}
		else
		{
			exit("<script type=\"text/javascript\">alert('提交失败');location.href=\"pay_partner_info.php\";</script>");
		}
	}
	
	$rs=$objBuyCar->GetPayPartnerInfo($ID);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $strOperation; ?>资讯</title>
<?php include_once("../common/files.php"); ?>
<script type="text/javascript">
<!--
function checkFrm(dom){
	if(dom.PartnerID.value==""){
		alert('请输入支付宝商号');
		dom.PartnerID.focus();
		return false;
	}
	else if(dom.SecurityCode.value==""){
		alert('请输入安全检验码');
		dom.PartnerID.focus();
		return false;
	}
	else if(dom.SellerEmail.value==""){
		alert('请输入支付宝帐户');
		dom.PartnerID.focus();
		return false;
	}
	else{
		return true;
	}
}
-->
</script>
</head>

<body id="main" >
<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
  <tr>
    <td><h1><?=$name?>支付设置</h1></td>
    <td class="actions"><table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
        <tr>
          <td class="active"><a href="#" >信息</a></td>
      
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%">
</table>
<form name="form1" method="post" action="" onsubmit="return checkFrm(this);">
<div id="TabsAll">
<div id="Tab_1"> 
  <table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
    <tr id="infoTitleTr">
      <th> <input name="action" type="hidden" value="edit" />
        <?=$name?>商号：</th>
      <td><input name="PartnerID" type="text" value="<?=$rs[0]['PartnerID']?>" size="80" maxlength="255" />
      </td>
    </tr>
    <tr id="strTips">
      <th> <?=$name?>安全检验码：</th>
      <td><input name="SecurityCode" type="text" value="<?=$rs[0]['SecurityCode']?>" size="80" maxlength="255" />
      </td>
    </tr>
    <tr id="strTips">
      <th> <?=$name?>帐户：</th>
      <td><input name="SellerEmail" type="text" value="<?=$rs[0]['SellerEmail']?>" size="80" maxlength="255" />
      </td>
    </tr>
  </table>
  <div class="buttons">
    <input name="" type="submit" value="保存" />
  </div>
  </div>
  </div>
</form>

<?php include "../bottom.php"; ?>
</div>
</body>
</html>
